package com.code.day14;

import java.time.LocalDate;
import java.time.Period;

public class Day14Period {
    public static void main(String[] args) {
        LocalDate localDate1 = LocalDate.of(2024, 10, 10);
        LocalDate localDate2 = LocalDate.of(2025, 11, 12);
        Period period = Period.between(localDate1, localDate2);
        System.out.println(period.getYears()); //获取相差的年
        System.out.println(period.getMonths()); //获取相差的月
        System.out.println(period.getDays()); //获取相差的天
    }
}
